<?php
namespace app\Admin\controller;
use think\Controller;
use think\Request;
use app\admin\controller\Auth;
class Base extends Controller
{
    public function _initialize()
    {
//        if (!session('uid') || !session('username')){
//            $this->error('请先登录系统','Login/index');
//        }
        $auth = new Auth();
        $request = Request::instance();
        //获取当前控制器名称
        $con = $request->controller();
        //获取当前控制器方法名称
        $action = $request->action();
        $name = $con.'/'.$action;
        $this->assign(array(
            'con'     =>$con,
            'action'  =>$action
        ));
        $notCheck = array('Index/index','Admin/logout');
    }
}
